<?php
if (!defined("IN_OP"))
{
    exit("You can't access this file directly...");
}
$gametype = intval(getvar("gametype"));
$gType = chkGametype($gametype);
switch ($gType)
{
    case 0 :
        $ui = new UI();
        break;
    default :
        include_once( "class_3d/CheckMode_3d.php" );
        $chk = new CheckMode_3d($curruser['acl'], 1, $gametype);
        $chk->checkShow3dPage();
        unset($chk);
        $ui = new UI_3D();
        $jslink = "<script language=\"JScript.Encode\" src=\"site.js\"></script>" . ( "<script language=\"VBScript.Encode\" src=\"site.vbs\"></script>" );
        $ui->set("jslink", $jslink);
        $ui->header();
        break;
}
$tpl = new Template2();
$user_id = intval(getvar("id"));
$rs = getdb("select from_unixtime(logindt),ip from k_log where user_id = {$user_id} order by from_unixtime(logindt) desc");
$rs1 = getdb("select * from k_user where id= {$user_id}");
$rs2 = getdb("select acl,account from k_user where id = " . $rs1->f['prev_id']);
echo "<table border='1' cellpadding='3' cellspacing='0' width='300'>";
echo ( $rs1->f['acl'] < 0 ? "【归属】：" : "【阶层】：" ) . ( $rs1->f['acl'] < 0 ? $aclname[$rs2->f['acl']] . "帐号《" . $rs2->f['account'] . "》" : $aclname[$rs1->f['acl']] ) . "<br>";
echo ( $rs1->f['acl'] < 0 ? "【子帐号】：" : "【帐号】：" ) . $rs1->f['account'] . "<br>";
echo ( $rs1->f['acl'] < 0 ? "【子帐号名称】：" : "【名称】：" ) . $rs1->f['name'] . "<br>";
echo "<tr class=bgImg_" . $gametype . " align=center><td nowrap>登入日期<td nowrap>登入IP";
if ($rs->eof)
{
    echo "<tr class=td2 align=center><td colspan=\"2\">无登入资料</td></tr>";
}
else if (!$rs->eof)
{
    while (!$rs->eof)
    {
        echo "<tr class=td2 align=center><td>" . $rs->f['from_unixtime(logindt)'] . "</td><td>" . $rs->f['ip'] . "</td></tr>";
        $rs->movenext();
    }
}
echo "</table>";
?>